<?php 
require('./roots.php');
require_once('./classes/rbac.php');

if(!isset($_SESSION['lang'])){

$_SESSION['lang']='es';


}
if(isset($_GET['valid'])){

    $valid=$_GET['valid'];

}
if(isset($_SESSION['roles']) && isset($_SESSION['sess_login_username'])){
    if( ($_SESSION['sess_login_username']!='') && ($_SESSION['roles']!='')){
        
        header('Location: rbac.php');
    }

}


include('languaje/'.$_SESSION['lang'].'/lang_'.$_SESSION['lang'].'_rbac.php');


include "header.php";



$action='rbac_session.php';

$msj = '';


?>
 <form method="post" action="<?php echo $action;?>" name="regform" ENCTYPE="multipart/form-data"> 


	<div id="page">
	<div id="page-bgtop">
	<div id="page-bgbtm">
		<div id="content">
			<div class="post">
			<div class="post-bgtop">
			<div class="post-bgbtm">
				<h2 class="title"><a href="#"><?php echo $LDAGL; ?></a></h2>
					
				
                                <div class="entry">
					<p>
					

                                                            <table>
                                                                <?php 
                                                                if ($valid=="F")
                                                                echo "<tr>"
                                                                .$LDErrorLogin.
                                                                "</tr>";

                                                                ?>
                                                                <tr>
                                                                    <td width="=40%">login:
                                                                    </td>    
                                                                    <td width="=40%"><input type="text" name="login"/>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td width="=40%">password: 
                                                                    </td>    
                                                                    <td width="=40%"><input type="password" name="password"/> 
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                                

                                                                <br>
                                                                

                                       
					</p>
                                        <p>
					<?php echo $LDSelecIdioma; ?><br>
								<select name="lang">
									<option value=es> <?php echo $LDEspanol; ?> </option>
									<option value=en> <?php echo $LDIngles; ?> </option>
                                                               	</select><br>
								<input type="submit" value="<?php echo $LDEntrar; ?> " name="validar" class="botonDesign" />						<br><br>
							<?php echo $LDRolesMensaje; ?>
					</p>
				</div>
			</div>
			</div>
			</div>
			
		<div style="clear: both;">&nbsp;</div>
		</div>

		<div id="sidebar">
				<ul>
					<li>
						<h2><?php echo $LDCategorias; ?></h2>

						<?php

						include "MenuRbac.php";

						?>	
						<script type="text/javascript">

						cssdropdown.startchrome("chromemenu")

						</script>
				</li>
			</ul>
		</div>

		<div style="clear: both;">&nbsp;</div>
	</div>
	</div>
	</div>
</div>

</form>

<?php

include "footer.php";

?>
